import request from '@/util/request'

export function selectAllAddress() {
    return request({
        url: '/address/all',
        method: 'get'
    })
}

export function addAddress(address) {
    return request({
        url: '/address/add',
        method: 'post',
        data: address
    })
}

export function updateAddress(address) {
    return request({
        url: '/address/update',
        method: 'put',
        data: address
    })
}

export function delAddress(id) {
    return request({
        url: '/address/del',
        method: 'delete',
        params: {
            id: id
        }
    })
}


export function setDefaultAddress(id) {
    return request({
        url: '/address/set/default',
        method: 'get',
        params: {
            id: id
        }
    })
}